package com.soup.lab.spring.aop;

import com.soup.lab.spring.aop.component.IDoService;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cglib.core.DebuggingClassWriter;
import org.springframework.context.ConfigurableApplicationContext;

@SpringBootApplication
public class SpringAOPApplication {

    public static void main(String[] args) {
        System.setProperty("sun.misc.ProxyGenerator.saveGeneratedFiles","true");
        System.setProperty(DebuggingClassWriter.DEBUG_LOCATION_PROPERTY, "E:\\IdeaProjects\\lab\\spring-aop-lab\\target\\cglib");
        ConfigurableApplicationContext ac = SpringApplication.run(SpringAOPApplication.class, args);
        IDoService bean = ac.getBean(IDoService.class);
        bean.doSth();
    }

}
